#!/bin/bash

echo "启动分布式缓存系统..."
echo "正在构建并启动Docker容器..."

# 构建并启动服务
docker-compose up --build -d

echo "等待服务启动..."
sleep 5

echo "检查服务状态..."
docker-compose ps

echo ""
echo "服务已启动！"
echo "节点1: http://127.0.0.1:9527"
echo "节点2: http://127.0.0.1:9528"
echo "节点3: http://127.0.0.1:9529"
echo ""
echo "使用客户端操作："
echo "  python client.py 9527 set key value"
echo "  python client.py 9527 get key"
echo "  python client.py 9527 delete key"
echo ""
echo "运行测试："
echo "  python test_system.py"
